<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="id1"></div>

    <script>
        let div = document.getElementById("id1")
        // 操作文本
        div.innerText = "123";
        div.innerHTML = "<strong>123</strong>"
        // 操作JS
        div.style.color='red'
        div.style.fontSize='22px'
        div.style.padding='2em'
    </script>
</body>
</html>